
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;
import pojo.ChucNang;
import service.ChucNangService;
import service.impl.ChucNangServiceImpl;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author pvhuy
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
         ApplicationContext context = new FileSystemXmlApplicationContext("C:/Users/pvhuy/Documents/NetBeansProjects/MinhKhaiBookStore/build/web/WEB-INF/dispatcher-service.xml");
         ChucNangService chucNangService = (ChucNangServiceImpl)context.getBean("chucNangService");

         ChucNang chucNang = new ChucNang();
         chucNang.setTenChucNang("Đăng nhập");

         chucNangService.saveChucNang(chucNang);
    }

}
